package com.ericsson.middleware.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.ericsson.middleware.dao.LampDao;
import com.ericsson.middleware.entities.LampState;

@Component
public class LampService {

	@Autowired
	private LampDao lampDAO;		
	
	public void save(LampState lamp) throws Exception {
		lampDAO.insert(lamp);
	}

	public void update(LampState lamp) throws Exception {
		lampDAO.update(lamp);
	}

	public LampState searchById(String id) throws Exception {
		return lampDAO.findById(id);
	}	
}